// 用于打印指定格式的错误信息

const styles = {
  log: 'background:#35495e; color:#fff; padding:2px 6px; border-radius:2px;',
  debug: 'background:#42b883; color:#fff; padding:2px 6px; border-radius:2px;',
  info: 'background:#2196f3; color:#fff; padding:2px 6px; border-radius:2px;',
  error: 'background:#ff4757; color:#fff; padding:2px 6px; border-radius:2px; font-weight:bold;'
}
export class Log {
  static log(title, ...args: any[]) {
    console.log(`%c [ ${title} ] =>`, styles['log'], ...args)
  }

  static debug(title, ...args: any[]) {
    console.debug(`%c [ ${title} ] =>`, styles['debug'], ...args)
  }

  static info(title, ...args: any[]) {
    console.info(`%c [ ${title} ] =>`, styles['info'], ...args)
  }

  static error(title, ...args: any[]) {
    console.error(`%c [ ${title} ] =>`, styles['error'], ...args)
  }
}
